/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.feiyue.basic.server.dl;

import android.app.Notification;
import android.app.NotificationManager;
import android.content.Context;
import android.widget.RemoteViews;

public class DlRunnable implements Runnable {
	private int bookid;
	private String bookname;
	private Context context;
	private Notification notification;
	private NotificationManager notifyManager;
	private int percentage;

	public DlRunnable(Notification paramNotification,
			NotificationManager paramNotificationManager, Context paramContext,
			String paramString, int paramInt) {
		this.notification = paramNotification;
		this.notifyManager = paramNotificationManager;
		this.context = paramContext;
		this.bookname = paramString;
		this.bookid = paramInt;
	}

	public int getPercentage() {
		return this.percentage;
	}

	public void run() {
		this.notification.contentView.setTextViewText(2131099848, this.bookname
				+ " 已下载完成" + this.percentage + "%");
		this.notification.contentView.setProgressBar(2131099849, 100,
				this.percentage, false);
		this.notifyManager.notify(this.bookid, this.notification);
	}

	public void setPercentage(int paramInt) {
		this.percentage = paramInt;
	}
}